



/* Video Modal
-----------------------------------------*/
.video-modal,
.video-modal .overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3000;
}
.video-modal {
	overflow: hidden;
	position: fixed;
	opacity: 0.0;

  -webkit-transform: translate(500%,0%);
  transform: translate(500%,0%);

  -webkit-transition: -webkit-transform 0s linear 0s;
  transition: transform 0s linear 0s;


  /* using flexbox for vertical centering */

  /* Flexbox display */
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;

  /* Vertical alignment */
  -webkit-box-align: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;

  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.video-modal .overlay {
  z-index: 0;
  background: rgba(13,1,61,0.82); /* overlay color */

  opacity: 0.0;

  -webkit-transition: opacity 0.2s ease-out 0.05s;
  transition: opacity 0.2s ease-out 0.05s;
}


.video-modal-content {
	position: relative;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	z-index: 1;
  
	margin: 0 auto;

	overflow-y: visible;

	background: #000;
  
  width: calc(100% - 12em);
  height: 0;
  padding-top: calc((100% - 12em) * 0.5625); /* 16:9 calc */
}

/* Scaling to fit within the current Viewport size:
   When viewport aspect ratio is greater than 16:9
   work off the height instead of the width for calc */
 @media (min-aspect-ratio: 16/9) {
  .video-modal-content {
    width: 0;
    height: calc(100vh - 10em);
    padding-top: 0;
    padding-left: calc((100vh - 10em) * 1.7778); /* 16:9 calc */
  }
}

/* Mobile Layout Tweaks - side margins reduced */
@media (max-width: 640px) {
	.video-modal-content {
		width: calc(100% - 1em);
    padding-top: calc((100% - 1em) * 0.5625); /* 16:9 calc */
	}
}

/* modal close button */
.close-video-modal {
	display: block;
    position: absolute;
    left: 0;
    top: -40px;

    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

/* set the iframe element to stretch to fit its parent element */
iframe#youtube {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;

	background: #000;
	box-shadow: 0px 2px 16px rgba(0,0,0,0.5);
}

/* show the modal: 
   add class to the body to reveal */
.show-video-modal .video-modal {
	opacity: 1.0;

	transform: translate(0%,0%);
	-webkit-transform: translate(0%,0%);
}
.show-video-modal .video-modal .overlay {
	opacity: 1.0;
}
.show-video-modal .video-modal-content {
	transform: translate(0%,0%);
	-webkit-transform: translate(0%,0%);
}